<template>
    <div class="mainV">
        <div class="mainT">
            <i class="el-icon-back" @click="goBack"></i>
            <p>问诊报告</p>
            <div></div>
        </div>
        <div class="rVip">
            <div class="rVipi">
                <p>疾病名称分类：</p>
                <div>{{ reportInfo.illnessClass }}</div>
            </div>
            <div class="rVipi">
                <p>治疗描述：</p>
                <div>{{ reportInfo.healDesc }}</div>
            </div>
            <div class="rVipi">
                <p>诊断结果：</p>
                <div>{{ reportInfo.diagnosis }}</div>
            </div>
            <div class="rVipi">
                <p>处方信息：</p>
                <div>{{ reportInfo.prescription }}</div>
            </div>
            <div class="rVipi">
                <p>是否需要复诊：</p>
                <div>{{ reportInfo.isVisit ? '是' : '否' }}</div>
            </div>
            <div class="rVipi" v-if="reportInfo.isVisit">
                <p>复诊时间：</p>
                <div>{{ reportInfo.visitDate }}</div>
            </div>
            <div class="rVipi">
                <p>备注：</p>
                <div>{{ reportInfo.remark }}</div>
            </div>
        </div>
    </div>
</template>

<script>
import { fetchPost, fetchGet } from '@/api/request'
export default {
    data() {
        return {
            reportInfo: {}
        }
    },
    mounted() {
        fetchGet('/wz/heal/wzHealRecord/queryByRoomId', { roomId: this.$route.query.roomId }).then(res => {
            this.reportInfo = res.result;
        })
    },
    methods: {
        goBack() {
            this.$router.back()
        }
    }
}
</script>

<style lang="scss" scoped>
.mainV {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    

    .mainT {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 60px;
        line-height: 60px;
        background-color: #fff;
        width: 100%;
        position: fixed;
        left: 0;
        top: 0;

        i {
            font-size: 32px;
            color: #67C23A;
            display: inline-block;
            margin-left: 20px;
        }

        p {
            width: 120px;
            text-align: center;
        }

        div {
            margin-right: 20px;
        }
    }

    .rVip {
        margin-top: 80px;
        padding: 20px;

        .rVipi {
            display: flex;
            font-size: 16px;
            margin-bottom: 10px;
            border-bottom: 1px dashed #ccc;
            padding-bottom: 10px;

            p {
                min-width: 120px;
                text-align: right;
                color: #444;
                margin: 0;
            }

        }
    }
}
</style>